package SensorData;

import java.io.Serializable;
import DateUtils.dateutils;
/**
 * @author zelonghu QQ:1032006226
 * @name test_all_without_network
 * @class name：SensorData
 * @class javabeans ,to describe sensor data
 * @time 2019/4/13 8:49 PM
 * @change
 * @chang time
 * @class describe
 */
public class SensorData implements Serializable {
    private String time;
    private int type;//传感器类型
    private double value1 = 0;
    private double value2 = 0;
    private double value3 = 0;
    private int flag = 0;//标定旗帜

    @Override
    public String toString() {
        return "传感器数据{" +
                "录取时间='" +dateutils.stampToDate(time,"yyyy-MM-dd HH:mm:ss")  + '\'' +
                ", 类型=" + type +
                ", value1=" + value1 +
                ", value2=" + value2 +
                ", value3=" + value3 +
                ", 标定=" + flag +
                '}'+'\n';
    }

    public SensorData() {

    }

    public SensorData(String time, int type, double value1, double value2, double value3, int flag) {
        this.time = time;
        this.type = type;
        this.value1 = value1;
        this.value2 = value2;
        this.value3 = value3;
        this.flag = flag;
    }

    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public double getValue1() {
        return value1;
    }

    public void setValue1(double value1) {
        this.value1 = value1;
    }

    public double getValue2() {
        return value2;
    }

    public void setValue2(double value2) {
        this.value2 = value2;
    }

    public double getValue3() {
        return value3;
    }

    public void setValue3(double value3) {
        this.value3 = value3;
    }

    public int getFlag() {
        return flag;
    }

    public void setFlag(int flag) {
        this.flag = flag;
    }
}
